//
//  TKLbutton.h
//  tuiguang
//
//  Created by wxt on 2018/8/17.
//  Copyright © 2018年 wxt. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef void(^tapActionBlock)(UIButton *button);

@interface UIButton (Block)
@property(nonatomic,copy)tapActionBlock actionBlock;

/**
 通过block对button的点击事件封装
 
 @param frame       frame
 @param title       标题
 @param bgImageName 背景图片
 @param actionBlock 点击事件回调block
 
 @return button
 */
+ (UIButton *)createBtnFrame:(CGRect)frame title:(NSString *)title bgImageName:(NSString *)bgImageName action:(tapActionBlock)actionBlock;
//文字在右
+ (UIButton *)createBtnFrame1:(CGRect)frame title:(NSString *)title bgImageName:(NSString *)bgImageName action:(tapActionBlock)actionBlock;
//文字在下
+ (UIButton *)createBtnFrame2:(CGRect)frame title:(NSString *)title bgImageName:(NSString *)bgImageName action:(tapActionBlock)actionBlock;
//返回
+ (UIButton *)createBtnFrameblack:(CGRect)frame title:(NSString *)title bgImageName:(NSString *)bgImageName action:(tapActionBlock)actionBlock;


+ (UIButton *)createBtnFrame:(CGRect)frame title:(NSString *)title bgImageName:(NSString *)bgImageName textcolor:(UIColor *)textcolor laycolor:(UIColor *)bgColor action:(tapActionBlock)actionBlock;
@end
